<!DOCTYPE html>

<html>
<head>
	<title>Nerv Widgets 3</title>
	
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta> 
	
	<link rel="stylesheet" href="../../themes/nw3/form.css" type="text/css" media="all"></link>
	
	<script src="../../nw3.js" type="text/javascript"></script>
	<script src="../../plugins/form/form.js" type="text/javascript"></script>
	<script src="../../langs/it.js" type="text/javascript"></script>
</head>

<body>

<script>
// stampa titolo pagina
window.document.title = NW3.toString();
</script>


<br />
Nerv Form Plugin: Select
<br />
<br />

<script>
oSelect = new NW3.form.select.Select({
		name : 'fieldname',
		width : '80',
		selected : 'Two'
	});
	
	oSelect.newOption({
		text : 'One',
		value : 'One'
	});
	
	oSelect.newOption({
		text : 'Two',
		value : 'Two'
	});
	
	oSelect.newOption({
		text : 'Three',
		value : 'Three'
	});
	
	oSelect.newOption({
		text : 'Four',
		value : 'Four'
	});
	
	oSelect.print();
</script>

<script>
	oSelect = new NW3.form.select.Select({
		name : 'fieldname',
		width : '80',
		status : 'disabled'
	});
	
	oSelect.newOption({
		text : 'One'
	});
	
	oSelect.newOption({
		text : 'Two'
	});
	
	oSelect.newOption({
		text : 'Three'
	});
	
	oSelect.newOption({
		text : 'Four'
	});
	
	oSelect.print();
</script>

&nbsp;&nbsp;

<script>
	oSelect = new NW3.form.select.Select({
		name : 'fieldname2',
		width : '80'
	});
	
	oSelect.onChange(function(id, val){
		alert(val);
	});
	
	oSelect.newOption({
		text : 'One',
		image : '../img/star.png'
	});
	
	oSelect.newOption({
		text : 'Two',
		image : '../img/password.png'
	});
	
	oSelect.print();
</script>


<br />
<br />
Async with JSON
<br /><script>
	oSelect = new NW3.form.select.Select({
		name : 'fieldname3',
		width : '80'
	});

	oSelect.print();

	oSelect.loadAjaxUrl('../selectSerializedOptions.html');
</script>

</body>
</html>
